﻿#!/bin/bash

# http://www.inprose.com/articles/10-enable-aspnet-support-in-fedora-linux.html

METHOD=yum

# The instructions below also work on other RedHat Linux flavors such as 
# CentOS or maybe Fedora.
# Put the Mono.repo file in the /etc/yum.repo.d/ directory:
MONO_REPO="
[Mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/
gpgcheck=1
gpgkey=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/repodata/repomd.xml.key
enabled=1
"

echo "$MONO_REPO" > /etc/yum.repos.d/mono.repo
echo cat /etc/yum.repos.d/mono.repo


echo "##########################################################################"
echo yum 4 Mono

#Remove old MONO packages
yum -y erase mono*
yum -y erase xsp*
yum -y erase libgdiplus*
yum -y erase mono-core mono-data mono-web

#Update system 
yum -y update

#Clean the yum cache to be on the safe side
yum clean all

YUM='yum -y install'

$YUM monotools-addon-server



# The installed binaries will end up in "/opt/novell/mono/bin".
# issue the following command to set up shell environment so that it finds 
# mono, mcs and the other mono tools

source /opt/novell/mono/bin/mono-addon-environment.sh

echo "##########################################################################"
echo "Mono version test"

mono -V

echo "C# version test"
xsp --version

exit

#If you want the Mono environment to be permanent you can issue the following command
#or just remove remove hash[#]

#cp /opt/novell/mono/bin/mono-addon-environment.sh /etc/profile.d








